<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>接收JSON数据</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/json2/20160511/json2.min.js"></script>
    <script type="text/javascript">
        var test = window.location.search;
        console.log(getParam(test).id);
        /** 
        * 得到页面间的参数 
        */  
        function getParam(url){     
            var param={};  
            if(url.indexOf("?")!=-1){  
                var str = url.substr(1)　//去掉?号  
                strs = str.split("&");  
                for(var i=0;i<strs.length;i++){  
                    param[strs[i].split("=")[0]]=strs[i].split("=")[1];  
                }  
            }  
            return param;  
        }
    </script>
</head>
<body>
<p id="id"></p>
<p id="name"></p>
<p id="author"></p>
</body>
</html>